﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace cs5643.rigidbody
{
    public struct Rot2D
    {
        private double r;
        private double cos;
        private double sin;

        public static Rot2D Identity = new Rot2D(0);

        public Rot2D(double radians)
        {
            r = radians;
            cos = Math.Cos(radians);
            sin = Math.Sin(radians);
        }

        public Trafo2D ToTrafo2D()
        {
            return new Trafo2D(
                cos, sin, 0,
                -sin, cos, 0,
                0, 0, 1
                );
        }

    }
}
